package com.se.domain.vo;

import com.se.domain.mysql.UserDO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

@Data
@NoArgsConstructor
public class UserVO {
    Long userId;
    String uname;
    String imgUrl;
    Boolean self = false;

    public UserVO(UserDO userDO) {
        this.userId = userDO.getUserId();
        this.uname = userDO.getUname();
        this.imgUrl = userDO.getImgUrl();
    }

    public UserVO(Long userId) {
        this.userId = userId;
    }

    public void checkSelf(Long userId){
        this.self = Objects.equals(this.userId, userId);
    }
}
